package cn.edu.xmist.utils;

import org.newdawn.slick.Color;
import org.newdawn.slick.TrueTypeFont;

import java.awt.*;

/**
 * 文本工具类
 */
public final class TextUtil {

	/**
     *
	 * @param text
     * @param x
     * @param y
	 */
	public static void draw(String text, int x, int y) {
		Color.yellow.bind();
		TrueTypeFont font;
		Font awtFont = new Font("Times New Roman", Font.BOLD, 24); //name, style (PLAIN, BOLD, or ITALIC), size
		font = new TrueTypeFont(awtFont, false); //base Font, anti-aliasing true/false
		font.drawString(x, y, text, Color.yellow);
		Color.white.bind();
	}
}
